#ifndef AudioDeviceObserverImpl_H
#define AudioDeviceObserverImpl_H

#include "audio_device_defines.h"
#include "jni_api.h"

class AudioDeviceObserverImpl : public webrtc::AudioDeviceObserver, public JniCallbackGlobal
{
public:
	AudioDeviceObserverImpl(void);
	~AudioDeviceObserverImpl(void);

protected:	//JniCallbackBase
	virtual bool init_jni(JNIEnv* env);

public:		//webrtc::AudioDeviceObserver
	virtual void OnErrorIsReported(const ErrorCode error);
	virtual void OnWarningIsReported(const WarningCode warning);

protected:
	jmethodID m_mid_OnErrorIsReported;
	jmethodID m_mid_OnWarningIsReported;

	jclass m_cls_ErrorCode;
	jmethodID m_mid_ErrorCode_fromValue;
	jclass m_cls_WarningCode;
	jmethodID m_mid_WarningCode_fromValue;
};

#endif //!AudioDeviceObserverImpl_H
